package com.aso114.project.commonview;

import android.app.ProgressDialog;
import android.content.Context;
import android.graphics.drawable.AnimationDrawable;
import android.os.Bundle;
import android.view.ViewGroup;
import android.widget.ImageView;
import android.widget.TextView;

import com.aso114.project.R;

/**
 * @Description:自定义加载数据弹框
 * @author 2017-4-3 http://blog.csdn.net/android_cll
 */
public class CustomProgressDialog extends ProgressDialog {
    private ImageView mImageView;
    private String mLoadingTip;
    private TextView mLoadingTv;
//    private int mResid;
    public CustomProgressDialog(Context context, String content) {
        super(context);
        this.mLoadingTip = content;
//        this.mResid = id;
        setCanceledOnTouchOutside(true);
    }
    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        initView();
        initData();
    }
    private void initData() {
//        mImageView.setBackgroundResource(mResid);
        // 通过ImageView对象拿到背景显示的AnimationDrawable

//        mLoadingTv.setText(mLoadingTip);
    }
    private void initView() {
        setContentView(R.layout.loading_view);
//        mLoadingTv = (TextView) findViewById(R.id.wecate);
//        mImageView = (ImageView) findViewById(R.id.image);
    }
}

